<template>
  <ContentLeftRightLayout>
    <template v-slot:left>
      <Left @handleItemClick="handleItemClick"></Left>
    </template>
    <template v-slot:right>
      <Right v-if="currentItem" :currentItem="currentItem"/>
      <div class="ifMassage" v-else>{{ $t('common.common_select_left') }}</div>
    </template>
  </ContentLeftRightLayout>
</template>

<script>
import ContentLeftRightLayout from "@/layout/contentLeftRightLayout.vue";
import Left from "@/views/attribute/left.vue";
import Right from "@/views/attribute/right.vue";
export default {
  components: { 
    ContentLeftRightLayout,
    Left,
    Right
  },
  data() {
    return {
      // 右边需要的数据
      currentItem: null,
    };
  },
  mounted() {
    
  },
  methods: {
    // 选中左边数据
    handleItemClick(e) {
      this.currentItem = null;
      this.$nextTick(function () {
        this.currentItem = e;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>